<template>
  <div class="app" id="bu48">
    <merchantHeader />
    <div class="back">
      <div class="con">
        <div class="pxes"></div>
        <div class="listneo">
          <businessL />
          <div class="conres">
            <div class="ra">
              <h3>体验报告中心</h3>
            </div>

            <div class="forms">
              <el-form
                size="medium"
                :model="ruleForm"
                ref="ruleForm"
                label-width="180px"
                class="demo-ruleForm"
              >
                <el-form-item label="时间">
                  <el-col :span="16">
                    <el-form-item prop="date1">
                      <el-date-picker
                        v-model="ruleForm.date1"
                        type="daterange"
                        range-separator="至"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                      ></el-date-picker>
                    </el-form-item>
                  </el-col>
                </el-form-item>
                <el-form-item label="活动名称：" prop="bian">
                  <el-input v-model="ruleForm.bian" style="width: 50%;"></el-input>
                </el-form-item>
                <el-row>
                  <el-col :span="10">
                    <el-form-item label="提交人报告：">
                      <el-select v-model="ruleForm.posin" style="width: 100%;">
                        <el-option label="区域一11" value="shangha11i"></el-option>
                        <el-option label="区域二11" value="beijing11"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="10">
                    <el-form-item label="体验感：">
                      <el-select v-model="ruleForm.name" style="width: 100%;">
                        <el-option label="区域一11" value="shangha11i"></el-option>
                        <el-option label="区域二11" value="beijing11"></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item style="margin-left: 147px;">
                  <el-button size="medium" type="primary" @click="submitForm('ruleForm')">查询</el-button>
                </el-form-item>
              </el-form>
            </div>
            <div class="dzlist">
              <div class="tat">报告列表</div>
              <el-table
                :header-cell-style="{background:'#D6DCE1',color:'#2D405E'}" style="width: 873px;margin:15px auto"
                :data="tableData"
              >
                <el-table-column prop="date" label="报告提交时间"></el-table-column>
                <el-table-column prop="name" label="报告提交人"></el-table-column>
                <el-table-column prop="activity" label="活动概况"></el-table-column>
                <el-table-column prop="describe" label="评价概况"></el-table-column>
                <el-table-column label="操作" width="110">
                  <template>
                    <el-button
                      style="margin:5px 0px;width: 80px;"
                      round
                      @click="$router.push('/bussReportdetails')"
                      size="mini"
                    >查看详情</el-button>
                    <el-button
                      @click="pingyou"
                      style="margin:5px 0px;width: 80px;"
                      round
                      size="mini"
                    >评优</el-button>
                    <el-button
                      @click="dialogVisible = true"
                      style="margin:5px 0px;width: 80px;"
                      round
                      size="mini"
                    >一键转发</el-button>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <businessF />
          </div>
        </div>
      </div>
    </div>
    <Footer />
    <el-dialog :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
      <div class="lheds">一键转发</div>
      <div class="lbody">
        <el-form label-width="100px">
          <el-form-item label="推荐原因">
            <el-input type="textarea" v-model="cause"></el-input>
          </el-form-item>
          <el-form-item label="体检报告内容">
            <el-row>
              <el-input type="textarea" @input="descInput" maxlength="200" v-model="content"></el-input>
              <span style="position: absolute; right: 10px;bottom: 0;">{{txtVal}}/200以内</span>
            </el-row>
            <el-row class="rows">
              <img src="@/assets/img/aa.png" alt />
            </el-row>
          </el-form-item>
        </el-form>
      </div>
      <el-button style="margin: 0 auto;display: block;" type="primary" @click="zhuanfa">提交</el-button>
      <div style="height:15px"></div>
    </el-dialog>
  </div>
</template>
<script>
import merchantHeader from "@/components/merchantHeader";
import Footer from "@/components/Footer";
import businessL from "@/components/businessL";
import businessF from "@/components/businessF";
export default {
  components: {
    merchantHeader,
    Footer,
    businessL,
    businessF
  },
  data() {
    return {
      ruleForm: {
        posin: "",
        desc: "",
        date1: ""
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "风中有朵雨做的云",
          activity: "【免费体验】",
          describe: "简伯格真皮百搭款女包颜色正，皮质好，适合各种场合使用"
        }
      ],
      dialogVisible: false,
      cause: "",
      content: "",
      txtVal: 0
    };
  },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          alert("submit!");
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    },
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then(_ => {
          done();
        })
        .catch(_ => {});
    },
    zhuanfa() {
      this.dialogVisible = false;
      this.$message({
        message: "转发成功",
        type: "success"
      });
    },
    pingyou() {
      this.$message({
        message: "评优成功",
        type: "success"
      });
    },
    descInput() {
      this.txtVal = this.content.length;
    }
  }
};
</script>
<style lang="stylus">
.app /deep/ .ist_l .ist_c li:nth-child(1) {
  background-color: #ff9381;
  width: 126px;
  height: 50px;
  display: block;
}

#bu48 {
  .back {
    background-color: #f06048;
  }

  .pxes {
    height: 15px;
  }

  .back .con {
    width: 1200px;
    margin: 0 auto;
    background-color: #eee;
  }

  .listneo {
    width: 1161px;
    margin: 0px auto;
    display: flex;
    justify-content: space-between;
  }

  .conres {
    width: 902px;
    border-radius: 6px;
    background-color: #fff;
  }

  .conres .ra h3 {
    font-size: 20px;
    color: #f06048;
    padding-left: 14px;
    border-bottom: 1px solid #cecece;
    margin-top: 15px;
    padding-bottom: 20px;
    // margin-bottom: 20px;
  }

  .shejh {
    display: flex;
    margin-left: 20px;
    margin-top: 15px;
    line-height: 20px;
  }

  .shejh div:nth-child(1) {
    font-size: 20px;
  }

  .shejh div:nth-child(2) {
    font-size: 14px;
    margin-left: 40px;
  }

  .wdmewdefme {
    display: flex;
  }

  .mubiao {
    display: flex;
    margin-left: 20px;
    margin-top: 40px;
  }

  .toefmn_wk {
    margin-right: 12px;
  }

  .toefmn_wk span {
    display: block;
  }

  .toefmn_wk .ene {
    color: #f06048;
  }

  .one_mw {
    display: flex;
  }

  .wnwe_wdnn .ee_q {
    margin-top: 20px;
  }

  .wnwe_wdnn .ee_q h5 {
    font-size: 18px;
  }

  .wnwe_wdnn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    width: 300px;
  }

  .top_o2 {
    font-size: 18px;
    line-height: 20px;
    margin-left: 20px;
    margin-top: 25px;
    display: flex;
  }

  .ower_to {
    width: 873px;
    height: 141px;
    border: solid 1px #a0a0a0;
    margin: 10px auto;
    display: flex;
    text-align: center;
    line-height: 45px;
  }

  .ower_to h4 {
    font-size: 18px;
  }

  .jaoyishuj {
    margin-bottom: 35px;
  }

  .errror .hekome1 {
    width: 20%;
    border-right: 1px solid #a0a0a0;
  }

  .hekome2 {
    text-align: center;
    margin-left: 20px;
  }

  .list_org {
    height: 40px;
  }

  .yuansdj {
    display: flex;
    border-bottom: 6px solid #fff;
  }

  .lino {
    display: inline-block;
    font-size: 20px;
    margin-left: 10px;
    line-height: 40px;
    margin-top: 10px;
  }

  .list_org ul li {
    display: inline-block;
    line-height: 40px;
    width: 100px;
    border: 1px solid rgb(199, 199, 199);
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    margin-left: 8px;
  }

  .forms {
    margin-top: 20px;
  }

  .dzlist .tat {
    font-size: 18px;
    margin-top: 10px;
    margin-left: 20px;
    margin-bottom: 10px;
  }

  .el-dialog__header {
    padding: 0px !important;
  }

  .el-dialog__body {
    padding: 0px !important;
  }

  .lheds {
    width: 100%;
    height: 60px;
    background-color: rgb(240, 96, 72);
    color: white;
    text-align: center;
    line-height: 60px;
    font-size: 24px;
  }

  .lbody {
    width: 80%;
    margin: 15px auto;
  }

  .rows {
    margin-top: 15px;
  }

  .rows img {
    width: 100px;
    height: 100px;
  }
}
</style>